/*
 * @Author: your name
 * @Date: 2019-10-21 14:01:06
 * @LastEditTime: 2019-10-22 09:31:00
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /c:\Users\DELL\Desktop\zhhu\app\Router\index.js
 */
const fs =require('fs');
module.exports=(app)=>{
    fs.readdirSync(__dirname).forEach(file=>{
        if(file === 'index.js'){return;}
        const route =require(`./${file}`)
        app.use(route.routes()).use(route.allowedMethods());
    });
}